package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;

import com.ruoyi.system.mapper.api.WCenterAddressMapper;
import com.ruoyi.system.domain.api.WCenterAddress;
import com.ruoyi.system.service.IWCenterAddressService;

/**
 * 钱包地址Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-04-22
 */
@DataSource(DataSourceType.SLAVE)
@Service
public class WCenterAddressServiceImpl implements IWCenterAddressService 
{
    @Autowired
    private WCenterAddressMapper wCenterAddressMapper;

    /**
     * 查询钱包地址
     * 
     * @param id 钱包地址主键
     * @return 钱包地址
     */
    @Override
    public WCenterAddress selectWCenterAddressById(Long id)
    {
        return wCenterAddressMapper.selectWCenterAddressById(id);
    }

    /**
     * 查询钱包地址列表
     * 
     * @param wCenterAddress 钱包地址
     * @return 钱包地址
     */
    @Override
    public List<WCenterAddress> selectWCenterAddressList(WCenterAddress wCenterAddress)
    {
        return wCenterAddressMapper.selectWCenterAddressList(wCenterAddress);
    }

    /**
     * 新增钱包地址
     * 
     * @param wCenterAddress 钱包地址
     * @return 结果
     */
    @Override
    public int insertWCenterAddress(WCenterAddress wCenterAddress)
    {
        return wCenterAddressMapper.insertWCenterAddress(wCenterAddress);
    }

    /**
     * 修改钱包地址
     * 
     * @param wCenterAddress 钱包地址
     * @return 结果
     */
    @Override
    public int updateWCenterAddress(WCenterAddress wCenterAddress)
    {
        return wCenterAddressMapper.updateWCenterAddress(wCenterAddress);
    }

    /**
     * 批量删除钱包地址
     * 
     * @param ids 需要删除的钱包地址主键
     * @return 结果
     */
    @Override
    public int deleteWCenterAddressByIds(Long[] ids)
    {
        return wCenterAddressMapper.deleteWCenterAddressByIds(ids);
    }

    /**
     * 删除钱包地址信息
     * 
     * @param id 钱包地址主键
     * @return 结果
     */
    @Override
    public int deleteWCenterAddressById(Long id)
    {
        return wCenterAddressMapper.deleteWCenterAddressById(id);
    }
}
